package com.PictureSite.controller;

import java.io.PrintWriter;

import javax.naming.ConfigurationException;
import javax.servlet.http.HttpServletResponse;

import freemarker.template.Configuration;
import freemarker.template.Template;

public abstract class PictureSiteController {

 		public final void bindModel(Object model,String templateName,HttpServletResponse resp) throws Exception {
			Configuration configuration = new Configuration(); 
			Template template = configuration.getTemplate("html/"+templateName);
			PrintWriter output = resp.getWriter();
			template.process(model, output);
		}
}
